package org.honeyweb.gsoc.pages;

import org.acegisecurity.context.SecurityContextHolder;
import org.apache.tapestry5.ComponentResources;
import org.apache.tapestry5.Link;
import org.apache.tapestry5.annotations.OnEvent;
import org.apache.tapestry5.ioc.annotations.Inject;

public class Logout {

	@Inject
	private ComponentResources resources;
	
	@OnEvent(component = "logout")
    public Link onLogout()
    {
		SecurityContextHolder.getContext().setAuthentication(null);
    	return resources.createPageLink("connect", false);  
    }
}
